<!DOCTYPE html>
## Tell the browser not to render this page if it's contained within a frame.
## This is to prevent Clickjacking attack.
#*
The following variables are available on this page, but not used by default:
$client_id      - The ID of the OAuth client used in this transaction

It is recommended to sanitize the values that are displayed using $escape.escape() for example $escape.escape($client_id).
*#

$HttpServletResponse.setHeader("X-Frame-Options", "DENY")

<!-- template name: request.approval.page.html -->

<html lang="$locale.getLanguage()" dir="ltr">
<head>
    <title>$pluginTemplateMessages.getMessage("title")</title>
    <base href="$CurrentPingFedBaseURL"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="x-ua-compatible" content="IE=edge" />
    <link rel="stylesheet" media="all" type="text/css" href="assets/css/main.css" />
    <script type="text/javascript">
            function postResponseAllow()
            {
                document.forms[0].action =$allowAction;
                document.forms[0].submit();
            }

            function postResponseDeny()
            {
                document.forms[0].action =$denyAction;
                document.forms[0].submit();
            }
    </script>
</head>
<div class="ping-container ping-large">

    <!--
    if there is a logo present in the 'company-logo' container,
    then 'has-logo' class should be added to 'ping-header' container.
    -->
    <div class="ping-header">
        <span class="company-logo"><!-- client company logo here --></span>
        $pluginTemplateMessages.getMessage("title")
    </div><!-- .ping-header -->

    <div class="ping-body-container">
        <form method="post">

            <div class="ping-body">

                <div class="ping-section ping-request">
                    <div class="section-title">
                        $pluginTemplateMessages.getMessage("", "info.1", $escape.escape($client_id))
                    </div>
                    <div class="ping-input-container ping-checkbox-container stacked">
                        <ul class="no-bullets">
                            #foreach( $scopeEntry in $scopeDescriptions.entrySet() )
                            <li>
                                <label>
                                    <input type="checkbox" name="scopes" value="$escape.escape($scopeEntry.getKey())" checked="true" />
                                    $escape.escape($scopeEntry.getValue())
                                    <div class="icon"></div>
                                </label>
                            </li>
                            #end
                        </ul>
                    </div>


                </div><!-- .ping-section.ping-label -->

                <div class="ping-section ping-client">
                    <!-- Icons must be 100px by 100px minimum -->
                    <span class="icon-apps"></span>
                    <dl>
                        <dd>
                            $escape.escape($client_id)
                        </dd>
                    </dl>
                </div><!-- .ping-section.ping-warning-icon -->
                <div class = "input-row">
                    <div class="ping-buttons">
                        <a onclick="postResponseAllow();"  class="ping-button normal allow" title="$pluginTemplateMessages.getMessage("allow")" >
                        $pluginTemplateMessages.getMessage("allow")
                        </a>
                        <a onclick="postResponseDeny();" class="ping-button blue deny" title="$pluginTemplateMessages.getMessage("deny")">
                        $pluginTemplateMessages.getMessage("deny")
                        </a>
                    </div><!-- .ping-buttons -->
                </div>
            </div><!-- .ping-body -->
        </form>

        <div class="ping-clr"></div>
    </div><!-- .ping-body-container -->

    <div class="ping-footer-container">
        <div class="ping-footer">
            <div class="ping-credits"></div>
            <div class="ping-copyright">$pluginTemplateMessages.getMessage("global.footerMessage")</div>
        </div> <!-- .ping-footer -->
    </div> <!-- .ping-footer-container -->

</div><!-- .ping-container -->
</body>
</html></title>
</head>
<body>

</body>
</html>
